document.onreadystatechange = loadPage;

/**
 * 页面效果
 */
$(document).ajaxStart(
	function() {
		Pace.restart(); 
	}
);
	
function loadPage(){
	if(document.readyState == "complete"){
		/**
		 * 菜单选中效果
		 */
		var resourceChildActive = $("#resourceChildActive");
		if(resourceChildActive != null && resourceChildActive!=undefined){
			var parent = resourceChildActive.parent().parent().addClass("active");
			var flag = true;
			var node = parent[0];
			if(node != null && node!=undefined){
				try{
					while(flag){
						if(node != null && node!=undefined && node.getAttribute("class")=="treeview"){
							node.setAttribute("class",node.getAttribute("class") + " active");
							break;
						} else {
							node = node.parentNode;
						}
					}
				} catch (e) {
				}
			}
		}
	}
}


